﻿@using Janus.Mes.VO;
@model IEnumerable<WorkCenterVO>
@{
    Layout = null;
    int i = 1;
    ViewBag.ViewTitle = "工作中心";
    var SearchParma = ViewData["SearchParma"] as WorkCenterVO ?? new WorkCenterVO();
}
<form id="pagerForm" method="get" action="BaseData/WorkCenter/index?action=page&OpID=@ViewData["OperateID"]">
    <input type="hidden" name="pageNum" value="1" />
    <input type="hidden" name="numPerPage" value="@ViewData["pageSize"]" />
    <input type="hidden" name="RowCount" value="@ViewData["RowCount"]" />
    <input type="hidden" name="WorkCCode" value="@SearchParma.WorkCCode" />
    <input type="hidden" name="WorkCName" value="@SearchParma.WorkCName" />
    <input type="hidden" name="CType" value="@SearchParma.CType" />
</form>
<div class="pageHeader" >
    <form onsubmit="return navTabSearch(this);" id="Form_@ViewData["CurrentController"]" action="BaseData/WorkCenter/index?action=search&OpID=@ViewData["OperateID"]"
          method="post">
        <div class="searchBar" style="display:none;">
            <table class="searchContent">
                <tr>
                    <td>
                        工作中心编码：
                    </td>
                    <td>
                        <input id="WorkCCode" name="WorkCCode" type="text" class="textInput" />
                    </td>
                    <td>
                        工作中心名称：
                    </td>
                    <td>
                        <input id="WorkCCode" name="WorkCName" type="text" class="textInput" />
                    </td>
                    <td>
                        工作中心类别：
                    </td>
                    <td>
                        <select id="CType" name="CType">
                            <option value="">请选择</option>
                            <option value="0">CNC自动线</option>
                            <option value="1">清洗线</option>
                            <option value="2">组装线</option>
                        </select>
                    </td>
                    <td align="right">
                        <div class="subBar">
                            <ul>
                                <li>
                                    <div class="buttonActive">
                                        <div class="buttonContent">
                                            <button type="submit" name="submit">
                                                查询
                                            </button>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</div>
<div class="pageContent">
    @Html.Partial("Buttons", ViewData["CurrentPageButtons"])
    <table class="treetable list " width="100%" layouth="55">
        <thead>
            <tr class="header">
                <th style="width: 150px">序号</th>
                <th>工作中心代码</th>
                <th>工作中心名称</th>
                <th>所属类别</th>
                <th>所属部门</th>
                <th>中心负责人</th>
                <th>上级工作中心</th>
                <th>启用</th>
                <th>备注</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr target="WorkCenter_id" rel="@(item.WorkCCode)"  data-tt-id="@(item.WorkCCode)" data-tt-parent-id="@(item.Superior)">
                    <td>
                        @i
                    </td>

                    <td>@item.WorkCCode</td>

                    <td>@item.WorkCName</td>

                    <td>@item.CType</td>

                    <td>@item.DeptCode</td>

                    <td>@item.Person</td>

                    <td>@item.Superior</td>

                    <td>@item.IsEnable</td>

                    <td>@item.Remark</td>
                </tr>
                i += 1;
            }
        </tbody>
    </table>
</div>
@Html.Partial("PageBar")

